package wowmobileclient;

import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;

public class FightHud {

    public Graphics g;
    public int width;
    public int height;

    public FightHud(Graphics g, int width, int height) {
        this.g = g;
        this.width = width;
        this.height = height;
    }

    public void draw(int iteration) {
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
        g.setColor(0,0,255);
        g.drawLine(0, height/2+height/4, width, height/2+height/4);
        String tmp="Kupa blada cos nie wyszlo";
        
        eraseMenu();
        switch(iteration)
        {
            case 0:
                tmp=" 1: Atak \n 2: Magia \n 3: Przedmiot \n 0: Obrona";
                break;
            case 1:
                tmp="Troche chorej magii i troche chorych przedmiotow :D :D";
                break;
            case 2:
                tmp="Wybierz cel: \n 1.      2. \n 3.      4. \n 5.      6. \n   7. All";
        }
        
        g.drawString(tmp,  0, height/2+height/4, Graphics.TOP | Graphics.LEFT);
        
     


        /*if(end){
        g.setColor(0, 0, 0);
        g.fillRect(0, 0, width, height);
        g.setColor(0x00FF0000);
        g.drawString("RESTART LEVEL", 65, 80, Graphics.TOP | Graphics.LEFT);
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE));
        g.drawString("DWARF DEAD", 60, 60, Graphics.TOP | Graphics.LEFT);
        }*/
    }
    
    public void drawMsg(String msg)
    {
        g.setColor(255, 0, 255);
        g.drawString(msg,0,(int)(height/2.75),Graphics.TOP | Graphics.LEFT);
    }

    private void eraseMenu() {
        g.setColor(0,0,0);
        g.fillRect(0,height/2+height/4, width, height);
        g.setColor(0,0,255);
    }
}
